<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    //方式一
    var str1 = new String("abc");
    //方式二
    var str2 = "abc";
    var str3 = 'abc';

    //length
    // alert(str3.length);

    //trim():去除字符串前后两端的空白字符

    var str4 = ' abc ';

    alert(1 + str4.trim() + 1);

</script>

</body>
</html>